package com.jackstraw.jack_base.datasource.elasticsearch.entity.bean;

import cn.hutool.core.io.unit.DataSize;
import com.jackstraw.jack_base.datasource.common.entity.AbstractPropertiesEntity;
import lombok.Data;

import java.time.Duration;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * es连接配置
 */
@Data
public class ElasticSearchPropertiesEntity extends AbstractPropertiesEntity<ElasticSearchPropertiesEntity> {
    private List<String> endpoints = new ArrayList(Collections.singletonList("localhost:9200"));
    private boolean useSsl = false;
    private String username;
    private String password;
    private Duration connectionTimeout;
    private Duration socketTimeout;
    private DataSize maxInMemorySize;
    /**
     * httphost schema
     */
    private String scheme = "http";

    /**
     * 每次查询数量
     */
    private Integer querySize = 10;

}
